from pymud import Alias, Trigger, SimpleCommand, SimpleTrigger, SimpleAlias, Timer

# 屏蔽
class Configuration:
    def __init__(self, session) -> None:
        self.session = session
        self._triggers = {}
        self._initTriggers()

    def _initTriggers(self):
        self._triggers["tri_filter"] = SimpleTrigger(self.session,
            r"^(?!你).+盘膝坐下，开始修炼内力。|^(?!你).+深深吸了几口气，精神看起来好多了。|^(?!你).+运功完毕，深深吸了口气，站了起来。|^(?!你).+的身影突然出现在一阵烟雾之中。|^只见一阵烟雾过後，(?!你).+的身影已经不见了。|^(?!你).+向铁匠|铁匠对(?!你).+道：这是给你的工钱。|^(?!你).+拿|^(?!你).+拉|^(?!你).+用",
            "#gag",
            group="tri_filter", id="tri_filter"
        )
        self._triggers["tri_filter_1"] = SimpleTrigger(self.session,
            r"^你从.+身上搜出一件布衣。",
            "drop cloth",
            group="tri_filter", id="tri_filter_1"
        )
        self.session.addTriggers(self._triggers)